package zuoye23.zuoye6;

public class Test{
    public static void main(String[] args) {
        //这是输入猫的属性
//        Cat cat = new Cat();
//        cat.setName("汤姆");
//        cat.setWeight(20);
//        cat.setVariety("篮白");
        Cat cat=new Cat("汤姆","蓝白",20);
       //这是调用猫的属性和方法
        String eat = cat.eat();
        String sleep = cat.sleep();
        String s = cat.selfIntroduce();
        String cat1 = cat.cat();
        System.out.println(s+" "+eat+" "+sleep+" "+cat1);

        //这是输入狗的属性
        Dog dog = new Dog();
        dog.setName("斯派克");
        dog.setWeight(80);
        dog.setVariety("斗牛犬");
        //这是调用狗的属性和方法
        String eat1 = dog.eat();
        String sleep1 = dog.sleep();
        String s1 = dog.selfIntroduce();
        String god = dog.god();
        System.out.println(s1+" "+eat1+" "+sleep1+" "+god);

        //这是输入鹦鹉的属性
        Parrot parrot = new Parrot();
        parrot.setName("鹦鹉");
        parrot.setWeight(1);
        parrot.setVariety("大头");
        String eat2 = parrot.eat();
        String sleep2 = parrot.sleep();
        String s2 = parrot.selfIntroduce();
        String parrot1 = parrot.parrot();
        System.out.println(s2+" "+eat2+" "+sleep2+" "+parrot1);

    }

}
